using System;
using System.Collections.Generic;
using System.Text;

namespace Horizon
{
    /// <summary>
    /// Represents a single option for sorting search results
    /// </summary>
    [Serializable]
    public class SortOption
    {
        string labelValue, keyValue;

        public SortOption()
        {
        }

        /// <summary>
        /// Creates a sort option from a label and key
        /// </summary>
        /// <param name="label">Label for this search option</param>
        /// <param name="key">Internal key used for this search option</param>
        public SortOption(string label, string key)
        {
            this.labelValue = label;
            this.keyValue = key;
        }


        #region "Public Properties"

        /// <summary>
        /// Display labl for this sort option
        /// </summary>
        public string Label
        {
            get { return labelValue; }
            set { labelValue = value; }
        }

        /// <summary>
        /// Internal key used to represent this sort option (passed with request)
        /// </summary>
        public string Key
        {
            get { return keyValue; }
            set { keyValue = value; }
        }
        #endregion

    }
}
